package jucTest;

import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicInteger;

public class VolatileDemo {
    private static AtomicInteger a=new AtomicInteger(0);
    private static CountDownLatch lactsh = new CountDownLatch(10);
    private static CyclicBarrier Barrier = new CyclicBarrier(11);

    public  static void add() {
       a.incrementAndGet();
    }

    public static void main(String[] args) throws InterruptedException, BrokenBarrierException {
        VolatileDemo.add();


    }
}
